package com.kh.pajx.sop.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.kh.pajx.sop.base.BaseDaoImpl;
import com.kh.pajx.sop.dao.ISysUserGroupDao;
import com.kh.pajx.sop.domain.SysUserGroup;

/**
 * 系统用户组持久化操作接口实现类
 * @author:	azzcsimp
 * @Createdate:	2014年7月17日 下午8:14:57
 */
@Repository
public class SysUserGroupDaoImpl extends BaseDaoImpl<SysUserGroup> implements ISysUserGroupDao {
	
	@Override
	public String getMaxUsgCode(){
		List list = findListByHql("SELECT max(usg.usgCode) FROM SysUserGroup usg ");
		if(null == list.get(0)){
			return "";
		}
		return list.get(0).toString();
	}
	
	@Override
	public List<SysUserGroup> findAll() {
		return findList("FROM SysUserGroup usg order by usg.usgCode asc");
	}

}
